bool MKRAPI TestPluginImp::Start(IBundleContext * pBundleContext)
{
    bool bRet = false;
    try
    {
        //初始化
        if(0 == pBundleContext)
            return false;
        m_pBundCnt = pBundleContext;

        IAllocator * pAllocator = 0;
        pBundleContext->GetAllocator(&pAllocator);
        if(0 == pAllocator) return false;
        m_pAlloc = pAllocator;

        char *strValue = 0;
        int iRet = pBundleContext->GetProperty(APP_PATH,&strValue);
        if((USUAL_ERROR == iRet) || (0 == strValue)) return false;
        string strAppPath = strValue;
        m_pAlloc->Free((void *)strValue);

        //获取服务管理器
        IServiceManager * pServiceManager = 0;
        iRet = pBundleContext->GetServiceManager(&pServiceManager);
        if((SUCCESS != iRet) || (0 == pServiceManager))
        {
            m_pServMgr = 0;
            return false;
        }
        m_pServMgr = pServiceManager;

        //从配置文件中获取基础配置
        IINIConfigParser * pIniConfigParser = (IINIConfigParser *)pConfigParserFactory->CreateConfigParser("config.xml","TestServerPlugin",XML);
        if(0 == pIniConfigParser) return false;

        bRet = true;
    }
    catch(...)
    {
        bRet = false;
    }
    return bRet;
}